Skip to content

chore(lint): enable clippy::manual_let_else#163

Open
tupe12334 wants to merge 1 commit into
mainfrom
lint/enable-manual_let_else
Open

chore(lint): enable clippy::manual_let_else#163
tupe12334 wants to merge 1 commit into
mainfrom
lint/enable-manual_let_else

Conversation

@tupe12334

Copy link
Copy Markdown
Member

What

Promote clippy::manual_let_else to deny in core/Cargo.toml ([lints.clippy]), continuing the incremental clippy ratchet.

Why

manual_let_else flags diverging match/if let blocks that exist only to bind a value and otherwise bail (return/break/panic), suggesting the dedicated let ... else { ... } form. That keeps the happy path readable, states the binding + divergence once, and keeps the bound name in the enclosing scope by construction. See #162 for full rationale.

Change

  • Single line added: manual_let_else = "deny" (with a comment explaining the intent), matching the style of the surrounding lint entries.
  • No other rules touched; nothing disabled.

Verification

  • cargo clippy --all-targets → passes, 0 violations (lands clean as a forward guard).
  • cargo test → all tests pass (15 tests).

Closes #162


This pull request was opened by the Add lint rule → issue + PR (owned repos + my orgs) → Slack routine of moadim. cc @tupe12334

Promote clippy::manual_let_else to deny, continuing the incremental
clippy ratchet. The codebase currently has zero violations, so this is a
guard against future verbose diverging match/if-let bindings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable clippy::manual_let_else lint

1 participant